function PCMSAD(PID) {
  this.ID        = PID;
  this.PosID  = 0; 
  this.ADID		  = 0;
  this.ADType	  = "";
  this.ADName	  = "";
  this.ADContent = "";
  this.PaddingLeft = 0;
  this.PaddingTop  = 0;
  this.Width = 0;
  this.Height = 0;
  this.IsHitCount = "N";
  this.UploadFilePath = "";
  this.URL = "";
  this.SiteID = 0;
  this.ShowAD  = showADContent;
  this.Stat = statAD;
}

function statAD(id) {
	var sp = document.createElement("SCRIPT");
	sp.type = "text/javascript";
	sp.src = "http://phpcms.top/index.php?m=poster&c=index&a=show&siteid="+this.SiteID+"&id="+id+"&spaceid="+this.PosID;
	document.body.appendChild(sp);
}

function showADContent() {
  var content = this.ADContent;
  var isIE=!!window.ActiveXObject;
  var str = "<div id='PCMSAD_"+this.PosID+"'>";
  var AD = eval('('+content+')');
  var count = 0;
  if(AD.ADImage.length){
	  count = AD.ADImage.length;
  }
  for(var i=0;i<count;i++){
	if (isIE){

		if (document.readyState=="complete"){
			this.Stat(AD.ADImage[i].imgID);
		} else {
			document.onreadystatechange=function(){
				if(document.readyState=="complete") this.Stat(AD.ADImage[i].imgID);
			}
		}
	} else {
		this.Stat(AD.ADImage[i].imgID);
	}
	  str += "<li><a href='"+this.URL+"&siteid="+this.SiteID+"&id="+AD.ADImage[i].imgID+"&url="+AD.ADImage[i].imgADLinkUrl+"' target='_blank'><img alt='"+AD.ADImage[i].imgADAlt+"' title='"+AD.ADImage[i].imgADAlt+"' src='"+this.UploadFilePath+AD.ADImage[i].ImgPath+"' ";
	  var sizeStr = "";
	  if(this.Width==0&&this.Height>0){
		  sizeStr = " height='"+this.Height+"' ";
	  }else if(this.Width>0&&this.Height==0){
		  sizeStr = " width='"+this.Width+"' ";
	  }else{
		  sizeStr = (this.Width < this.Height) ? " width='"+this.Width+"' " : " height='"+this.Height+"' ";
	  }
	  str += sizeStr;
	  str += " style='border:0px;'/></a></li>";
	}
  str += "</div>";
  document.write(str);
}
 
var cmsAD_17 = new PCMSAD('cmsAD_17'); 
cmsAD_17.PosID = 12; 
cmsAD_17.ADID = 17; 
cmsAD_17.ADType = "images"; 
cmsAD_17.ADName = "品质如生命，产品即人品"; 
cmsAD_17.ADContent = "{'ADImage':[  {'imgID':'17','imgADLinkUrl':'','imgADAlt':'70%的新客户来源于老客户介绍，<br />
              在中国为你生产日本品质的精密机械加工件，<br />
              可对应中/日/英 多语言图纸。','ImgPath':'http://phpcms.top/uploadfile/2021/1104/20211104084314671.jpg','imgADLinkTarget':'New','showAlt':'Y'}  , {'imgID':'16','imgADLinkUrl':'','imgADAlt':'打样3~7天，批量7~10天可交货，<br />
              使用国内和国际知名物流 顺丰，DHL，UPS等，<br />
              省内客户，紧急情况开车送货。','ImgPath':'http://phpcms.top/uploadfile/2021/1104/20211104084245760.jpg','imgADLinkTarget':'New','showAlt':'Y'}  , {'imgID':'15','imgADLinkUrl':'','imgADAlt':'1年365天，1天24小时在线为您提供报价，咨询，<br />
              多品种小批量的对应体制，1个也能加工，<br />
              圆的，方的，异形的，都能解决。','ImgPath':'http://phpcms.top/uploadfile/2021/1104/20211104084216374.jpg','imgADLinkTarget':'New','showAlt':'Y'}  , {'imgID':'14','imgADLinkUrl':'','imgADAlt':'公司创始人从事精密机械加工20年以上，<br />
              拥有10多位从事精密机械加工20多年的技术师，<br />
              免费提供技术咨询和技术交换。','ImgPath':'http://phpcms.top/uploadfile/2021/1104/20211104084140187.jpg','imgADLinkTarget':'New','showAlt':'Y'} ]}"; 
cmsAD_17.URL = "http://phpcms.top/index.php?m=poster&c=index&a=poster_click"; 
cmsAD_17.SiteID = 1; 
cmsAD_17.Width = 10; 
cmsAD_17.Height = 10; 
cmsAD_17.UploadFilePath = ""; 
cmsAD_17.ShowAD();
